<?php
	
	/* La page de login, elle n'utilise pas le layout car elle est un
	 * peu differente
	 */
	
	session_start();
	
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=8">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Intranet de gestion des notes <?php include_once("../php/inc/defines.php"); echo VERSION; ?></title>
<script type="text/javascript">
	function focusOnInput() {
		document.getElementById("loginID").focus();
	}
</script>
<link rel="stylesheet" type="text/css" href="../css/styles.css">
</head>
<body onload="focusOnInput()">
	<div class="header">
		<div class="logo">
			<img src="../images/logo.png" alt="Universit&eacute; du Maine">
		</div>
	</div>
	<div class="subtitle">Intranet de gestion des notes <?php include_once("../php/inc/defines.php"); echo VERSION; ?></div>
	<div class="loginContent">
		<form method="post" action="../php/dologin.php">
			<div class="loginFormDiv">
				<table cellpadding=5 class="loginFormTable">
					<tr><td class="fieldLabel"><label for="loginID">Identifiant :</label></td><td><input class="field" type="text" id="loginID" name="login"></td></tr>
					<tr><td class="fieldLabel"><label for="passwordID">Mot de passe :</label></td><td><input class="field" type="password" id="passwordID" name="password"></td></tr>
				</table>
			</div>
			<input class="loginButton" type="submit" value="Connexion">
		</form>
		<?php
			
			if(isset($_SESSION["loginMessage"])) {
				echo "<p class=\"errorMessage\">".$_SESSION["loginMessage"]."</p>";
				unset($_SESSION["loginMessage"]);
			}
			
		?>
	</div>
</body>
</html>
